fix(convex): stop retrying a deleted table and explain it - #91365
Conversation
A Convex sync only calls list_snapshot / document_deltas, which answer 404 when a table that schema discovery listed no longer exists at read time. The 404 was unclassified, so every scheduled run retried it and the customer saw the raw driver text (which carries the deployment host). Classify it non-retryable with an actionable message. Cloudflare transients are the 52x/530 family, so a 404 is never a transient blip this could disable a sync over. Generated-By: PostHog Desktop Task-Id: c515c2ae-d0fd-42c5-81fc-44b3650ff0ae
|
😎 Merged successfully - details. |
|
Hey @Gilbert09! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
🤖 CI report
|
There was a problem hiding this comment.
Small, focused fix within the Convex connector by an owning-team author, with tests covering the new behavior; no risky territory (schema, auth, billing, CI, deps) touched.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 10L, 1F substantive, 28L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (28L, 2F, single-area, fix) |
| stamphog 2.0.0b4 | .stamphog/policy.yml @ 0131b30 · reviewed head 0131b30 |
|
/trunk merge |
There was a problem hiding this comment.
Pull request overview
This pull request improves the Convex warehouse source’s error classification so that a missing/deleted table (404 from Convex streaming export read endpoints) is treated as non-retryable and surfaced to users with an actionable message, avoiding repeated scheduled retries and unhelpful raw driver text.
Changes:
- Mark
404 Client Erroras a non-retryable Convex error with a user-facing remediation message. - Extend Convex source tests to assert the 404 is recognized as non-retryable and that a friendly message is selected.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| products/warehouse_sources/backend/temporal/data_imports/sources/convex/source.py | Adds 404 to the Convex non-retryable error map with an actionable message. |
| products/warehouse_sources/backend/temporal/data_imports/sources/convex/tests/test_convex.py | Adds test coverage to lock in 404 classification and ensure a friendly message is surfaced. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…4 test Address Copilot review feedback: `test_missing_table_404_surfaces_actionable_message` claimed to mirror the finalizer's first-match selection but used a case-sensitive `key in error_msg` check, while production selection (`external_data_job.py`) uses `error_message_matches`, which lowercases both sides. Switch the test to use `error_message_matches` so it actually reflects production matching behavior.
A new stamphog review started for this PR — the fresh verdict replaces this approval.
There was a problem hiding this comment.
Approved.
Contained fix to a single warehouse connector's error classification, authored by a member of the owning team, with new tests covering the added behavior; no risky-territory surface (auth, billing, migrations, CI, deps) is touched, and the outdated Copilot comment concerns a pre-existing test pattern rather than the new production behavior.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 10L, 1F substantive, 34L/2F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (34L, 2F, single-area, fix) |
| stamphog 2.0.0b4 | .stamphog/policy.yml @ 216112f · reviewed head 216112f |
|
/trunk merge |
Problem
A Convex sync whose table was deleted on the source retried the same failing request on every schedule and showed the customer raw driver text they could not act on. The error never reached triage, because it is caught before it becomes an exception.
A sync only calls
list_snapshot/document_deltas. Convex answers those with a 404 when a table that schema discovery listed no longer exists at read time: it was deleted on the source, or it is a component table that streaming export does not serve. The 404 was unclassified, so it retried and stored the bare404 ... for url: <deployment host>string aslatest_error.Changes
404 Client Erroras non-retryable in the Convex source. Cloudflare surfaces transient edge problems as the 52x/530 family, which retry separately, so a 404 is never a transient blip this could disable a sync over.How did you test this code?
Ran the Convex source tests (
convex/tests/test_convex.py). Added atest_known_errors_matchcase for the missing-table 404 andtest_missing_table_404_surfaces_actionable_message, which catches a revert of this bucket to a raw orNonevalue. Did not run the full warehouse suite, because this sandbox has no dev stack.Automatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Fully autonomous
Found while triaging a batch of production warehouse sync failure classes. Skills invoked: /writing-user-facing-copy, /writing-tests, /writing-code-comments, /writing-pr-descriptions.
The example named one table in an installed
betterAuthcomponent. The fix is intentionally not table- or component-specific, because the next step (turn off syncing for the table) is the same whether the table was deleted or is not served by streaming export. No customer values are in this diff; the test uses an invented deployment host.Created with PostHog Desktop